package vip.sweet.biz.modular.product.service.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import vip.sweet.biz.modular.product.entity.BizProductVariants;
import vip.sweet.biz.modular.product.mapper.BizProductVariantsMapper;
import vip.sweet.biz.modular.product.params.BizProductVariantsAddParams;
import vip.sweet.biz.modular.product.service.BizProductVariantsService;

/**
 * @author ASUS
 * @Date 2025/10/5 11:56
 * @Descripition
 */
@Service
public class BizProductVariantsServiceImpl extends ServiceImpl<BizProductVariantsMapper, BizProductVariants> implements BizProductVariantsService {
    @Override
    public boolean add(BizProductVariantsAddParams addProductVariantsParams) {
        if (ObjectUtil.isNotEmpty(addProductVariantsParams))
            return save(BeanUtil.toBean(addProductVariantsParams, BizProductVariants.class));
        return false;
    }
}
